package common

import (
	"github.com/gin-gonic/gin"
	"organoid_public/global"
)

func Setup(r gin.IRouter) {
	l := global.Log
	h, err := newHandler(l)

	if err != nil {
		l.Error("module", "app/common", "function", "SetupRbac", "error", err.Error())
		panic(err)
	}

	rg := r.Group("common")

	e := rg.Group("enum")
	{
		e.GET("group", h.GetEnumWithGroup)
		e.GET("index", h.GetEnum)
	}
}
